"""
PyQt5版GUI工具
"""

from PyQt5.QtWidgets import *  # type: ignore
from PyQt5.QtCore import *  # type: ignore
from PyQt5.QtGui import *  # type: ignore
import sys

from ui.Ui_my_main_window import Ui_MainWindow


class MianWindow(QMainWindow):

    def __init__(self):
        super().__init__()
        # 创建对象
        self.ui = Ui_MainWindow()
        # 初始化内容
        self.ui.setupUi(self)
        # 初始化ui
        self.init_ui()
        
    def change_value(self, val):
        print("val：",val)

    def init_ui(self):
        self.ui.dial.valueChanged.connect(self.change_value)
        
        #给actionEXIT添加退出功能实现
        self.ui.actionexit.triggered.connect(self.close)


if __name__ == "__main__":
    app = QApplication(sys.argv)
    window = MianWindow()
    window.show()
    sys.exit(app.exec_())
